package com.spring.springboot.controller;

import com.spring.springboot.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author lking
 * @date 2019/11/27 20:26
 **/

@RestController
public class HelloController {

    @Value("${user.id}")
    private Long id;
    private String name;
    private Integer age;

    @Autowired
    private User user;
    @RequestMapping(value = "/hello", method = RequestMethod.GET)
    public String query() {


        System.out.println(user.getId());


        return user.getId()+"bbb";
    }
}

